import { legacy_createStore as createStore, applyMiddleware, compose } from 'redux'
import thunk from 'redux-thunk'
import reducer from './reducer'

const composeEnhancers = compose;
//增强中间件thunk   compose便于redux devtool 调试
const store = createStore(reducer, composeEnhancers(
  applyMiddleware(thunk)
));

export  default store;